<?php

namespace app\admin\validate\vip;

use think\Validate;

class VipValidate extends Validate
{
    protected $rule=array(
        "id"=>"require",
        "title"=>"require",
        "img"=>"require",
        "privilege"=>"require",
        "expire_time"=>"require",
        "price"=>"require",
        "level"=>"require",
        "introduce"=>"require",
    );
    protected $message=array(
        "id|require"=>"id为空",
        "title|require"=>"标题不能为空",
        "img|require"=>"请上传图片",
        "privilege|require"=>"请选择至少一个特权",
        "expire_time|require"=>"请输入过期时间",
        "price|require"=>"请输入vip金额",
        "introduce|require"=>"请输入vip介绍",
        "level|require"=>"请选择vip等级",
    );
    protected $scene=array(
        "create"=>array("title","img","privilege","expire_time","price","introduce","level"),
        "update"=>array("id","title","img","privilege","expire_time","price","introduce","level"),
    );
}